package com.zzq.service.impl;

import com.zzq.mapper.TendererInfoMapper;
import com.zzq.pojo.TenderInfo;
import com.zzq.service.TendererInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TendererInfoServiceImpl implements TendererInfoService {

    @Autowired
    private TendererInfoMapper tendererInfoMapper;

    @Override
    public List<TenderInfo> list() {
       return tendererInfoMapper.list();
    }

    @Override
    public List<TenderInfo> some() {
        return tendererInfoMapper.some();
    }

    @Override
    public void check(int no) {
        tendererInfoMapper.check(no);
    }

    @Override
    public void elect(int no) {
        tendererInfoMapper.elect(no);
    }

    @Override
    public List<TenderInfo> select(String manufacturer, String state) {
        return tendererInfoMapper.select(manufacturer, state);
    }

    @Override
    public List<TenderInfo> selectByName(String name) {
        return tendererInfoMapper.selectByName(name);
    }

    @Override
    public void add(TenderInfo tenderInfo) {
        tenderInfo.setState("待审核");
        tendererInfoMapper.add(tenderInfo);
    }

    @Override
    public void update(TenderInfo tenderInfo) {
        tendererInfoMapper.update(tenderInfo);
    }
}
